import { controller, httpGet as Get, httpPost as Post } from 'inversify-express-utils'
import { UserService } from './services'
import { inject } from 'inversify'
import { Request, Response } from 'express'
@controller('/user')
export class User {
    constructor(@inject(UserService) private readonly UserService: UserService) {

    }
    @Get('/index')
    public getIndex(req: Request, res: Response) {
        let result = this.UserService.getList()
        res.send(result)
    }

    @Post('/create')
    public ceeateUser(req: Request, res: Response) {
        let result = this.UserService.create()
        res.send(result)
    }
}